<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/fuman/js/oversea.js"></script>
<title>入库列表｜海外仓管理</title>
<script type="text/javascript">
function addstock(id)
{
	$.post("/oversea/ajaxbutton", {"op": "showaddstocklist","orderno":id},
	  function(data){
			if(data)
			{
				
				var tmp = "";
				for(var i=0;i<data.length;i++)
				{
					
					tmp+="  <ul>";
					tmp+=" <li>"+data[i].sku+"</li>";
					tmp+=" <li>"+data[i].goodsname+"</li>";
					tmp+=" <li>"+data[i].stock+"</li>";
					tmp+=' <li><input type="text" name="nums[]" id="nums" class="width50" value="{{$li.check_id}}" placeholder="填写数字")"  /><input type="hidden" name="id[]"  class="width50" value='+data[i].id+' /><input type="hidden" name="sku[]"  class="width50" value='+data[i].sku+' /></li>';
					tmp+="</ul>";
					
				}
				
				$("#showlist").html(tmp);
			}
			
	   },"json");
	$('#changstatusform').modal('show');
}
</script>
<body class="withvernav">
<div class="bodywrapper">
{{include file='/public/leftmenu.tpl'}}
<div class="centercontent tables">
  <div class="pageheader notab">
    <h1 class="pagetitle">入库列表</h1>
    <span class="pagedesc"></span>
    
    
     </div>
  <!--pageheader-->
  
  <div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
  <div id="contentwrapper" class="contentwrapper"> 
    <!--搜索栏-->
    <form class="stdform stdform2" method="get" action="/oversea/addstocklist">
      <div class="tableoptions"> 操作时间：
        <input type="text"  name="starttime" value="{{$starttime}} " onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" /> - <input type="text"  name="endtime" value="{{$endtime}} " onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" />
       入库单号: <input type="text" name="other" id="other" class="width100" value="{{$other}}" />
         状态:
                          <select class="selectCss2" name="status" id="status">
                    <option value="">请选择</option>
                    <option value="2"{{if $statuss==2}} selected{{/if}} > 未处理{{$statuss}} </option>
                    <option value="1" {{if $statuss==1}} selected{{/if}}> 已处理 </option>
                   
                  </select>
                           
        &nbsp;
        <button class="btn btn_orange btn_search radius50">Search</button>
        
      </div>
    </form>
    <!--搜索栏结束-->
    
    <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
      <colgroup>
      <col class="con1" />
      <col class="con0" />
      <col class="con1" />
      <col class="con0" />
      <col class="con1" />
      <col class="con0" />
      <col class="con1" />
      </colgroup>
      <thead>
        <tr>
          <th class="head0">ID</th>
          <th class="head0">入库单号</th>
          <th class="head0">SKU数</th>
          <th class="head1">数量</th>
            <th class="head1">状态</th>
          <th class="head0">创建时间</th>
          <th class="head1">创建人</th>
   
         
          <th class="head0">操作</th>
        </tr>
      </thead>
      <tbody>
      
      {{foreach from=$list item=li key=key}}
      <tr>
        <td>{{$li.id}}</td>
        <td>{{$li.orderno}}</td>
         <td class="center">{{$li.skunum}}</td>
        <td>{{$li.stocknum}}</td>
         <td>{{if $li.is_check==1}}已处理{{else}}未处理{{/if}}</td>
        <td>{{$li.updatetime}}</td>
        <td class="center">{{$li.username}}</td>
     
        <td class="center">{{if $li.is_check==0}}<a href="javascript:void(0)" onClick="addstock('{{$li.orderno}}')">入库</a> 
        ｜<a href="#" onClick="delproduct({{$li.id}})">删除</a>
      {{/if}}
        
      
        </td>
      </tr>
      {{/foreach}}
        </tbody>
      
    </table>
    <div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
    <br />
    <br />
  </div>
</div>
<!--bodywrapper-->
<!-- 模态框（Modal） SKU状态 -->
<form action="/oversea/ajaxbutton?op=savestock"  method="post" name="otherforms" id="otherforms" >
  <div class="modal fade" id="changstatusform" tabindex="-1" role="dialog" aria-labelledby="schangstatusform" aria-hidden="true">
    <div class="modal-dialog" style="width:740px;">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" 
               aria-hidden="true">× </button>
          <h4 class="modal-title" id="schangstatusform">入库操作 </h4>
        </div>
        <div class="modal-body">
      
       
       <div class="listtable">
       	<ul>
        	<li>SKU</li>
            <li>商品名称</li>
            <li>入库数</li>
            <li>实际入库数</li>
        </ul>
       </div>
        <div style="width:100%;height:400px; overflow-y:scroll; border:0px solid;" class="listtable">
          <span id="showlist"  ></span>
         </div>
      
        
       
          <div class="modal-footer">
            <button type="button" class="btn btn-default" 
               data-dismiss="modal"> 关闭 </button>
            <button type="submit" class="btn btn-primary" > 提交 </button>
          </div>
        </div>
        <!-- /.modal-content --> 
      </div>
      <!-- /.modal-dialog --> 
    </div>
  </div>
</form>
<!-- 模态框（Modal）状态结束 -->

</body>
</html>